package self.enumerate;
public enum ResponseCode {

    SUCCESS(200,"请求成功"),
    FAILURE(404,"请求失败"),
    PARAMETER_EXCEPTION(400,"参数异常"),
    SQL_EXCEPTION(100,"SQL异常"),
    SYSTEM_EXCEPTION(101,"系统异常"),
    UNAUTH_EXCEPTION(401,"认证未通过"),
    USER_DELETE_EXCEPTION(105,"自己不能删除自己"),
    USERNAME_PASSWORD_EXCEPTION(104,"用户名或者密码不对"),
    USER_NOT_FOUND_EXCEPTION(106,"用户不存在"),
    ADMIN_DELETE_EXCEPTION(107,"超级管理员角色不能删除"),
    BASE_SLOT_EXCEPTION(108,"未找到BaseSlot的实现类"),
    BASE_SLOT_ORDER_EXCEPTION(109,"未配置BaseSlot的执行顺序"),
    BASE_SLOT_NAME_EXCEPTION(110,"BaseSlot的名字有误"),
    BLACK_EXCEPTION(111,"黑名单异常"),
    LIMIT_MINUTE_EXCEPTION(112,"分钟限流达到上限"),
    LIMIT_HOUR_EXCEPTION(113,"小时限流达到上限"),
    LIMIT_DAY_EXCEPTION(114,"天限流达到上限"),
    PRODUCT_KEY_EXCEPTION(115,"产品的key有误"),
    DEVICE_KEY_EXCEPTION(117,"设备的key有误"),
    DEVICE_KEY_SECURITY_EXCEPTION(116,"设备的key或者security有误"),
    UNAUTHORIZATION_EXCEPTION(403,"没有权限访问接口");

    private Integer code;

    private String message;

    ResponseCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
